import { Column, Entity, JoinColumn, ManyToOne } from 'typeorm';
import { BaseEntity } from './base.entity';
import { User } from './user.entity';
import { TaskComment } from './task-comment.entity';

@Entity('task_comment_replies')
export class TaskCommentReply extends BaseEntity {
  @Column({ type: 'text' })
  content: string;

  @Column({ name: 'comment_id' })
  commentId: string;

  @ManyToOne(() => TaskComment, { onDelete: 'CASCADE' })
  @JoinColumn({ name: 'comment_id' })
  comment: TaskComment;

  @Column({ name: 'user_id' })
  userId: string;

  @ManyToOne(() => User)
  @JoinColumn({ name: 'user_id' })
  user: User;
} 